package object_string_0920;
/**
 * 5.字符串的替换
 * （1）String replaceAll替换所有
 * （2）String replaceFirst替换首个
 */
public class StringReplace {
    public static void main(String[] args) {
        String str="hello";
        System.out.println(str.replaceAll("l","_"));
        System.out.println(str.replaceFirst("l","-"));
    }
}
